package com.market.controller.wx;

import com.market.bean.MarketBrand;
import com.market.bean.common.BasePageInfo;
import com.market.bean.common.BaseRespVo;
import com.market.bean.common.CommonData;
import com.market.service.wx.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wh194@foxmail.com
 * @since 2022/12/31 20:02
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {
    @Autowired
    WxBrandService wxBrandService;

    @GetMapping("list")
    public BaseRespVo list(BasePageInfo info, Integer id, String name) {
        CommonData<MarketBrand> data = wxBrandService.list(info, id, name);
        return BaseRespVo.ok(data);
    }

    @GetMapping("detail")
    public BaseRespVo detail(Integer id ) {
         MarketBrand data = wxBrandService.detail(id);
        return BaseRespVo.ok(data);
    }
}
